#include "OS.h"

#include <unistd.h>

using namespace host;

void OS::SleepMS(UInt32 ms)
{
    usleep(ms * 1000);
}

void OS::Sleep(UInt32 sec)
{
    usleep(sec * 1000 * 1000);
}

int OS::GetErrno()
{
    return errno;
}


unsigned short OS::Ntohs(unsigned short val)
{
    return ntohs(val);
}

unsigned int OS::Ntohl(unsigned int val)
{
    return ntohl(val);
}

unsigned short OS::Htons(unsigned short val)
{
    return htons(val);
}

unsigned int OS::Htonl(unsigned int val)
{
    return htonl(val);
}
